﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;

namespace ConsoleApplication1
{
 public class queryController:ApiController{

        // GET api/values 
        [HttpGet]
        [Route("api/query")]
        public IEnumerable<string> Get()
        {
            return new string[] { "value1", "value2" };
        }
        //get api
        public string Get(string id)
        {
            return string.Format("owin {0} by:linezero",id);
        }
        // POST api
         public string Post([FromBody] string value)
        {
            return value;
        }
        // PUT api
        public string Put(int id, string value)
        {
            return "success";   
        }
        // DELETE api
        public string Delete(int id)
        {
            return "success";
        }
    }
}
